package com.nescafe.nescafepromo.model;

import java.util.HashMap;
import java.util.Map;

public enum GaisanoBranch {

	FIESTA_MALL_TABUNOK(1,"Gaisano Grand Fiestamall - Tabunok"),
	PRICE_CLUB_CARCAR(1,"Gaisano Grand Priceclub - Carcar"),
	MALL_OF_MACTAN(2,"Gaisano Grand Mall of Mactan"),
	TOLEDO(3,"Gaisano Grand Toledo"),
	MINGLANILLA(4,"Gaisano Grand Minglanilla"),
	TALAMBAN(5,"Gaisano Grand Talamban"),
	MANDAUE_CENTRO(6,"Gaisano Grand Mandaue Centro"),
	BACOLOD_SUPERMALL(7,"Gaisano Grand Bacolod Supermall"),
	BACOLOD_MAIN(8,"Gaisano Grand Bacolod Main"),
	KABANKALAN(9,"Gaisano Grand Kabankalan"),
	CITY_ROXAS(10,"Gaisano Grand City Roxas"),
	MARKETPLACE_ROXAS_CITY(11,"Gaisano Grand Marketplace - Roxas City"),
	ANTIQUE(12,"Gaisano Grand Antique"),
	CITIMALL_DAVAO(13,"Gaisano Grand Citimall Davao"),
	MALL_OF_TAGUM(14,"Gaisano Grand Mall of Tagum"),
	PANABO(15,"Gaisano Grand Panabo"),
	DIGOS(16,"Gaisano Grand Digos"),
	KORONADAL(17,"Gaisano Grand Koronadal");
	

	private static Map<Integer, GaisanoBranch> branches = new HashMap<Integer, GaisanoBranch>();

	static {
		for (GaisanoBranch b : values()) {
			branches.put(b.code, b);
		}
	}

	private String name = null;
	private int code = -1;

	private GaisanoBranch(int code, String name) {
		this.name = name;
		this.code = code;
	}

	public String getName() {
		return name;
	}

	public int getCode() {
		return code;
	}

	public static GaisanoBranch fromCode(int code) {
		return branches.get(code);
	}
}
